From 11c3c964112ae57ec5b67c96025a1a6f8f719ea3 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 29 Mar 2007 14:17:10 +0000 Subject: [PATCH] Revert r14063; listed as fix for bug 5817 in May 2006 but the behavior seems very unintuitive to me. The listed problem is that the backlink to the target page on Special:Recentchangeslinked shows blue for nonexistent pages, but this patch made it redirect to the nonexistent page, where I'd expect to just change the link coloring. The redirect behavior also makes it tough to work with the category mode for cats where the page hasn't been filled out yet. --- includes/SpecialRecentchangeslinked.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/includes/SpecialRecentchangeslinked.php b/includes/SpecialRecentchangeslinked.php index e116c4032c..a9c584f5f9 100644 --- a/includes/SpecialRecentchangeslinked.php +++ b/includes/SpecialRecentchangeslinked.php @@ -24,20 +24,15 @@ function wfSpecialRecentchangeslinked( $par = NULL ) { $wgOut->setPagetitle( wfMsg( 'recentchangeslinked' ) ); $sk = $wgUser->getSkin(); - # Validate the title - $nt = Title::newFromURL( $target ); - if( !is_object( $nt ) ) { - $wgOut->errorPage( 'notargettitle', 'notargettext' ); + if (is_null($target)) { + $wgOut->errorpage( 'notargettitle', 'notargettext' ); return; } - - # Check for existence - # Do a quiet redirect back to the page itself if it doesn't - if( !$nt->exists() ) { - $wgOut->redirect( $nt->getLocalUrl() ); + $nt = Title::newFromURL( $target ); + if( !$nt ) { + $wgOut->errorpage( 'notargettitle', 'notargettext' ); return; } - $id = $nt->getArticleId(); $wgOut->setSubtitle( htmlspecialchars( wfMsg( 'rclsub', $nt->getPrefixedText() ) ) ); -- 2.20.1